package com.atguigu.gulimall.member;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * @EnableDiscoveryClient注解开启服务注册与发现
 *
 * 远程调用别的服务：
 *  - 引入open-feign
 *  - 编写open-feign接口，用@FeignClient("服务名")注解声明被调用服务
 *      接口内的方法声明需要调用的服务的具体请求（要写被调用请求的完整路径）
 *  - 用@EnableFeignClients(basePackages = "服务客户端接口的基础包路径")注解开启远程调用
 *      开启远程调用指定了 Spring 扫描 Feign 客户端接口的基础包路径
 *      basePackages = "服务客户端接口的基础包路径"，路径为feign接口所在的包路径
 */
@EnableFeignClients(basePackages = "com.atguigu.gulimall.member.fen")
@EnableDiscoveryClient
@SpringBootApplication
public class GulimallMemberApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallMemberApplication.class, args);
    }

}
